home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Visual Basic new SourceCode and Projects / Adventure game / mdi.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-05-21  |  20.5 KB  |  612 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  3. Object = "{38911DA0-E448-11D0-84A3-00DD01104159}#1.1#0"; "COMCT332.OCX"
  4. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  5. Begin VB.MDIForm frmMDI 
  6.    BackColor       =   &H00808080&
  7.    Caption         =   "Adventure Game Creator"
  8.    ClientHeight    =   8310
  9.    ClientLeft      =   915
  10.    ClientTop       =   2205
  11.    ClientWidth     =   11880
  12.    Icon            =   "mdi.frx":0000
  13.    LinkTopic       =   "MDIForm1"
  14.    MousePointer    =   99  'Custom
  15.    StartUpPosition =   2  'CenterScreen
  16.    WindowState     =   2  'Maximized
  17.    Begin VB.Timer Timer8 
  18.       Enabled         =   0   'False
  19.       Interval        =   100
  20.       Left            =   3600
  21.       Top             =   0
  22.    End
  23.    Begin ComCtl3.CoolBar CoolBar1 
  24.       Align           =   1  'Align Top
  25.       Height          =   420
  26.       Left            =   0
  27.       TabIndex        =   2
  28.       Top             =   0
  29.       Width           =   11880
  30.       _ExtentX        =   20955
  31.       _ExtentY        =   741
  32.       BandCount       =   2
  33.       BackColor       =   12632256
  34.       _CBWidth        =   11880
  35.       _CBHeight       =   420
  36.       _Version        =   "6.0.8169"
  37.       MinWidth1       =   7995
  38.       MinHeight1      =   360
  39.       Width1          =   9000
  40.       NewRow1         =   0   'False
  41.       Child2          =   "ProgressBar1"
  42.       MinWidth2       =   1995
  43.       MinHeight2      =   255
  44.       Width2          =   1995
  45.       NewRow2         =   0   'False
  46.       Begin VB.Timer Timer6 
  47.          Enabled         =   0   'False
  48.          Interval        =   100
  49.          Left            =   1920
  50.          Top             =   0
  51.       End
  52.       Begin VB.Timer Timer7 
  53.          Enabled         =   0   'False
  54.          Interval        =   100
  55.          Left            =   2280
  56.          Top             =   0
  57.       End
  58.       Begin VB.Timer Timer5 
  59.          Enabled         =   0   'False
  60.          Interval        =   100
  61.          Left            =   1560
  62.          Top             =   0
  63.       End
  64.       Begin VB.Timer Timer4 
  65.          Enabled         =   0   'False
  66.          Interval        =   100
  67.          Left            =   1200
  68.          Top             =   0
  69.       End
  70.       Begin VB.Timer Timer2 
  71.          Enabled         =   0   'False
  72.          Interval        =   100
  73.          Left            =   480
  74.          Top             =   0
  75.       End
  76.       Begin VB.Timer Timer3 
  77.          Enabled         =   0   'False
  78.          Interval        =   100
  79.          Left            =   840
  80.          Top             =   0
  81.       End
  82.       Begin VB.Timer Timer1 
  83.          Enabled         =   0   'False
  84.          Interval        =   100
  85.          Left            =   120
  86.          Top             =   0
  87.       End
  88.       Begin MSComctlLib.ProgressBar ProgressBar1 
  89.          Height          =   255
  90.          Left            =   9195
  91.          TabIndex        =   3
  92.          Top             =   75
  93.          Width           =   2595
  94.          _ExtentX        =   4577
  95.          _ExtentY        =   450
  96.          _Version        =   393216
  97.          Appearance      =   1
  98.       End
  99.    End
  100.    Begin VB.PictureBox picToolbar 
  101.       Align           =   1  'Align Top
  102.       BackColor       =   &H00FFFFFF&
  103.       BeginProperty Font 
  104.          Name            =   "Times New Roman"
  105.          Size            =   8.25
  106.          Charset         =   0
  107.          Weight          =   700
  108.          Underline       =   0   'False
  109.          Italic          =   0   'False
  110.          Strikethrough   =   0   'False
  111.       EndProperty
  112.       Height          =   405
  113.       Left            =   0
  114.       ScaleHeight     =   345
  115.       ScaleMode       =   0  'User
  116.       ScaleWidth      =   11820
  117.       TabIndex        =   0
  118.       Top             =   420
  119.       Width           =   11880
  120.       Begin MSComDlg.CommonDialog CMDialog1 
  121.          Left            =   5880
  122.          Top             =   0
  123.          _ExtentX        =   847
  124.          _ExtentY        =   847
  125.          _Version        =   393216
  126.          CancelError     =   -1  'True
  127.          DefaultExt      =   "TXT"
  128.          Filter          =   $"mdi.frx":030A
  129.          FilterIndex     =   557
  130.          FontSize        =   1.27584e-37
  131.       End
  132.       Begin VB.Image imgCalcButton 
  133.          Height          =   225
  134.          Left            =   11000
  135.          Picture         =   "mdi.frx":03A3
  136.          Top             =   70
  137.          Width           =   240
  138.       End
  139.       Begin VB.Image imgExitButton 
  140.          Height          =   225
  141.          Left            =   11520
  142.          Picture         =   "mdi.frx":08D5
  143.          Top             =   75
  144.          Width           =   240
  145.       End
  146.       Begin VB.Image imgAboutButton 
  147.          Height          =   240
  148.          Left            =   11280
  149.          Picture         =   "mdi.frx":0E07
  150.          ToolTipText     =   "About AGC"
  151.          Top             =   60
  152.          Width           =   240
  153.       End
  154.       Begin VB.Image imgPasteButtonUp 
  155.          Height          =   225
  156.          Left            =   5640
  157.          Picture         =   "mdi.frx":0F09
  158.          Top             =   45
  159.          Visible         =   0   'False
  160.          Width           =   240
  161.       End
  162.       Begin VB.Image imgPasteButtonDn 
  163.          Height          =   225
  164.          Left            =   5280
  165.          Picture         =   "mdi.frx":143B
  166.          Top             =   45
  167.          Visible         =   0   'False
  168.          Width           =   240
  169.       End
  170.       Begin VB.Image imgCopyButtonDn 
  171.          Height          =   225
  172.          Left            =   4560
  173.          Picture         =   "mdi.frx":196D
  174.          Top             =   60
  175.          Visible         =   0   'False
  176.          Width           =   240
  177.       End
  178.       Begin VB.Image imgCopyButtonUp 
  179.          Height          =   225
  180.          Left            =   4920
  181.          Picture         =   "mdi.frx":1E9F
  182.          Top             =   60
  183.          Visible         =   0   'False
  184.          Width           =   240
  185.       End
  186.       Begin VB.Image imgCutButtonDn 
  187.          Height          =   225
  188.          Left            =   4200
  189.          Picture         =   "mdi.frx":23D1
  190.          Top             =   45
  191.          Visible         =   0   'False
  192.          Width           =   240
  193.       End
  194.       Begin VB.Image imgCutButtonUp 
  195.          Height          =   225
  196.          Left            =   3960
  197.          Picture         =   "mdi.frx":2903
  198.          Top             =   45
  199.          Visible         =   0   'False
  200.          Width           =   240
  201.       End
  202.       Begin VB.Image imgFileOpenButtonDn 
  203.          Height          =   225
  204.          Left            =   3360
  205.          Picture         =   "mdi.frx":2E35
  206.          Top             =   45
  207.          Visible         =   0   'False
  208.          Width           =   240
  209.       End
  210.       Begin VB.Image imgFileOpenButtonUp 
  211.          Height          =   225
  212.          Left            =   3720
  213.          Picture         =   "mdi.frx":3367
  214.          Top             =   45
  215.          Visible         =   0   'False
  216.          Width           =   240
  217.       End
  218.       Begin VB.Image imgFileNewButtonUp 
  219.          Height          =   300
  220.          Left            =   3000
  221.          Picture         =   "mdi.frx":3899
  222.          Top             =   30
  223.          Visible         =   0   'False
  224.          Width           =   315
  225.       End
  226.       Begin VB.Image imgFileNewButtonDn 
  227.          Height          =   300
  228.          Left            =   2760
  229.          Picture         =   "mdi.frx":3A0B
  230.          Top             =   30
  231.          Visible         =   0   'False
  232.          Width           =   315
  233.       End
  234.       Begin VB.Image imgPasteButton 
  235.          Height          =   225
  236.          Left            =   1560
  237.          Picture         =   "mdi.frx":3B7D
  238.          ToolTipText     =   "Paste"
  239.          Top             =   45
  240.          Width           =   240
  241.       End
  242.       Begin VB.Image imgCopyButton 
  243.          Height          =   225
  244.          Left            =   1200
  245.          Picture         =   "mdi.frx":40AF
  246.          ToolTipText     =   "Copy"
  247.          Top             =   60
  248.          Width           =   240
  249.       End
  250.       Begin VB.Image imgCutButton 
  251.          Height          =   225
  252.          Left            =   840
  253.          Picture         =   "mdi.frx":45E1
  254.          ToolTipText     =   "Cut"
  255.          Top             =   45
  256.          Width           =   240
  257.       End
  258.       Begin VB.Image imgFileOpenButton 
  259.          Height          =   225
  260.          Left            =   440
  261.          Picture         =   "mdi.frx":4B13
  262.          ToolTipText     =   "Open File"
  263.          Top             =   45
  264.          Width           =   240
  265.       End
  266.       Begin VB.Image imgFileNewButton 
  267.          Height          =   300
  268.          Left            =   0
  269.          Picture         =   "mdi.frx":5045
  270.          ToolTipText     =   "New File"
  271.          Top             =   30
  272.          Width           =   315
  273.       End
  274.    End
  275.    Begin MSComctlLib.StatusBar StatusBar1 
  276.       Align           =   2  'Align Bottom
  277.       Height          =   375
  278.       Left            =   0
  279.       TabIndex        =   1
  280.       Top             =   7935
  281.       Width           =   11880
  282.       _ExtentX        =   20955
  283.       _ExtentY        =   661
  284.       Style           =   1
  285.       SimpleText      =   "Status: Normal"
  286.       _Version        =   393216
  287.       BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
  288.          NumPanels       =   2
  289.          BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  290.             Bevel           =   0
  291.             Object.Width           =   19
  292.             MinWidth        =   19
  293.             Object.Tag             =   "Tab1"
  294.          EndProperty
  295.          BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
  296.             Text            =   "Status = Normal"
  297.             TextSave        =   "Status = Normal"
  298.          EndProperty
  299.       EndProperty
  300.       OLEDropMode     =   1
  301.    End
  302.    Begin VB.Menu mnuFile 
  303.       Caption         =   "&File"
  304.       Begin VB.Menu mnuFileNew 
  305.          Caption         =   "&New"
  306.       End
  307.       Begin VB.Menu mnuFileOpen 
  308.          Caption         =   "&Open"
  309.       End
  310.       Begin VB.Menu mnuFileExit 
  311.          Caption         =   "E&xit"
  312.       End
  313.       Begin VB.Menu mnuSeparator 
  314.          Caption         =   "-"
  315.       End
  316.       Begin VB.Menu mnuRecentFile 
  317.          Caption         =   "-"
  318.          Index           =   0
  319.          Visible         =   0   'False
  320.       End
  321.       Begin VB.Menu mnuRecentFile 
  322.          Caption         =   "RecentFile1"
  323.          Index           =   1
  324.          Visible         =   0   'False
  325.       End
  326.       Begin VB.Menu mnuRecentFile 
  327.          Caption         =   "RecentFile2"
  328.          Index           =   2
  329.          Visible         =   0   'False
  330.       End
  331.       Begin VB.Menu mnuRecentFile 
  332.          Caption         =   "RecentFile3"
  333.          Index           =   3
  334.          Visible         =   0   'False
  335.       End
  336.       Begin VB.Menu mnuRecentFile 
  337.          Caption         =   "RecentFile4"
  338.          Index           =   4
  339.          Visible         =   0   'False
  340.       End
  341.       Begin VB.Menu mnuRecentFile 
  342.          Caption         =   "RecentFile5"
  343.          Index           =   5
  344.          Visible         =   0   'False
  345.       End
  346.    End
  347.    Begin VB.Menu mnuOptions 
  348.       Caption         =   "&Options"
  349.       Begin VB.Menu mnuOptionsToolbar 
  350.          Caption         =   "&Toolbar"
  351.       End
  352.    End
  353.    Begin VB.Menu mnuTools 
  354.       Caption         =   "&Tools"
  355.       Begin VB.Menu mnuToolsCalculator 
  356.          Caption         =   "&Calculator"
  357.       End
  358.       Begin VB.Menu mnuToolsCompilerDirectives 
  359.          Caption         =   "&Compiler Directives"
  360.       End
  361.    End
  362.    Begin VB.Menu mnuHelp 
  363.       Caption         =   "&Help"
  364.       Begin VB.Menu mnuHelpAbout 
  365.          Caption         =   "&About"
  366.       End
  367.    End
  368. Attribute VB_Name = "frmMDI"
  369. Attribute VB_GlobalNameSpace = False
  370. Attribute VB_Creatable = False
  371. Attribute VB_PredeclaredId = True
  372. Attribute VB_Exposed = False
  373. '*** Main MDI form for MDI Notepad sample       ***
  374. '*** application.                               ***
  375. '**************************************************
  376. Option Explicit
  377. Private Sub imgAboutButton_Click()
  378. frmAbout.Show
  379. End Sub
  380. Private Sub imgCalcButton_Click()
  381. Calculator.Show
  382. End Sub
  383. Private Sub imgCopyButton_Click()
  384.     ' Refresh the image.
  385.     imgCopyButton.Refresh
  386.     ' Call the copy procedure
  387.     EditCopyProc
  388. End Sub
  389. Private Sub imgCopyButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  390.     ' Show the picture for the down state.
  391.     imgCopyButton.Picture = imgCopyButtonDn.Picture
  392. End Sub
  393. Private Sub imgCopyButton_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  394.     ' If the button is pressed, display the up bitmap when the
  395.     ' mouse is dragged outside the button's area; otherwise
  396.     ' display the down bitmap.
  397.     Select Case Button
  398.     Case 1
  399.         If X <= 0 Or X > imgCopyButton.Width Or Y < 0 Or Y > imgCopyButton.Height Then
  400.             imgCopyButton.Picture = imgCopyButtonUp.Picture
  401.         Else
  402.             imgCopyButton.Picture = imgCopyButtonDn.Picture
  403.         End If
  404.     End Select
  405. End Sub
  406. Private Sub imgCopyButton_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  407.     ' Show the picture for the up state.
  408.     imgCopyButton.Picture = imgCopyButtonUp.Picture
  409. End Sub
  410. Private Sub imgCutButton_Click()
  411.     ' Refresh the image.
  412.     imgCutButton.Refresh
  413.     ' Call the cut procedure
  414.     EditCutProc
  415. End Sub
  416. Private Sub imgCutButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  417.     ' Show the picture for the down state.
  418.     imgCutButton.Picture = imgCutButtonDn.Picture
  419. End Sub
  420. Private Sub imgCutButton_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  421.     ' If the button is pressed, display the up bitmap when the
  422.     ' mouse is dragged outside the button's area; otherwise,
  423.     ' display the down bitmap.
  424.     Select Case Button
  425.     Case 1
  426.         If X <= 0 Or X > imgCutButton.Width Or Y < 0 Or Y > imgCutButton.Height Then
  427.             imgCutButton.Picture = imgCutButtonUp.Picture
  428.         Else
  429.             imgCutButton.Picture = imgCutButtonDn.Picture
  430.         End If
  431.     End Select
  432. End Sub
  433. Private Sub imgCutButton_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  434.     ' Show the picture for the up state.
  435.     imgCutButton.Picture = imgCutButtonUp.Picture
  436. End Sub
  437. Private Sub imgExitButton_Click()
  438. End Sub
  439. Private Sub imgFileNewButton_Click()
  440.     ' Refresh the image.
  441.     imgFileNewButton.Refresh
  442.     ' Call the new file procedure
  443.     FileNew
  444. End Sub
  445. Private Sub imgFileNewButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  446.     ' Show the picture for the down state.
  447.     imgFileNewButton.Picture = imgFileNewButtonDn.Picture
  448. End Sub
  449. Private Sub imgFileNewButton_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  450.     ' If the button is pressed, display the up bitmap when the
  451.     ' mouse is dragged outside the button's area; otherwise,
  452.     ' display the down bitmap.
  453.     Select Case Button
  454.     Case 1
  455.         If X <= 0 Or X > imgFileNewButton.Width Or Y < 0 Or Y > imgFileNewButton.Height Then
  456.             imgFileNewButton.Picture = imgFileNewButtonUp.Picture
  457.         Else
  458.             imgFileNewButton.Picture = imgFileNewButtonDn.Picture
  459.         End If
  460.     End Select
  461. End Sub
  462. Private Sub imgFileNewButton_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  463.     ' Show the picture for the up state.
  464.     imgFileNewButton.Picture = imgFileNewButtonUp.Picture
  465. End Sub
  466. Private Sub imgFileOpenButton_Click()
  467.     ' Refresh the image.
  468.     imgFileOpenButton.Refresh
  469.     ' Call the file open procedure
  470.     FileOpenProc
  471. End Sub
  472. Private Sub imgFileOpenButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  473.     ' Show the picture for the down state.
  474.     imgFileOpenButton.Picture = imgFileOpenButtonDn.Picture
  475. End Sub
  476. Private Sub imgFileOpenButton_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  477.     ' If the button is pressed, display the up bitmap when the
  478.     ' mouse is dragged outside the button's area; otherwise,
  479.     ' display the down bitmap.
  480.     Select Case Button
  481.     Case 1
  482.         If X <= 0 Or X > imgFileOpenButton.Width Or Y < 0 Or Y > imgFileOpenButton.Height Then
  483.             imgFileOpenButton.Picture = imgFileOpenButtonUp.Picture
  484.         Else
  485.             imgFileOpenButton.Picture = imgFileOpenButtonDn.Picture
  486.         End If
  487.     End Select
  488. End Sub
  489. Private Sub imgFileOpenButton_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  490.     ' Show the picture for the up state.
  491.     imgFileOpenButton.Picture = imgFileOpenButtonUp.Picture
  492. End Sub
  493. Private Sub imgPasteButton_Click()
  494.     ' Refresh the image.
  495.     imgPasteButton.Refresh
  496.     ' Call the paste procedure
  497.     EditPasteProc
  498. End Sub
  499. Private Sub imgPasteButton_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  500.     ' Show the picture for the down state.
  501.     imgPasteButton.Picture = imgPasteButtonDn.Picture
  502. End Sub
  503. Private Sub imgPasteButton_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  504.     ' If the button is pressed, display the up bitmap when the
  505.     ' mouse is dragged outside the button's area; otherwise,
  506.     ' display the down bitmap.
  507.     Select Case Button
  508.     Case 1
  509.         If X <= 0 Or X > imgPasteButton.Width Or Y < 0 Or Y > imgPasteButton.Height Then
  510.             imgPasteButton.Picture = imgPasteButtonUp.Picture
  511.         Else
  512.             imgPasteButton.Picture = imgPasteButtonDn.Picture
  513.         End If
  514.     End Select
  515. End Sub
  516. Private Sub imgPasteButton_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  517.     ' Show the picture for the up state.
  518.     imgPasteButton.Picture = imgPasteButtonUp.Picture
  519. End Sub
  520. Private Sub MDIForm_Load()
  521. Timer8.Enabled = True
  522. Timer1.Enabled = True
  523.     ' Application starts here (Load event of Startup form).
  524.     Show
  525.     ' Always set the working directory to the directory containing the application.
  526.     ChDir App.Path
  527.     ' Initialize the document form array, and show the first document.
  528.     ReDim FState(1)
  529.      ReDim Document(1)
  530.     Document(1).Tag = 1
  531.     FState(1).Dirty = False
  532.     ' Read System registry and set the recent menu file list control array appropriately.
  533.     ' Set public variable gFindDirection which determines which direction
  534.     ' the FindIt function will search in.
  535.     gFindDirection = 1
  536. End Sub
  537. Private Sub mnuFileExit_Click()
  538.     ' End the application.
  539.     End
  540. End Sub
  541. Private Sub mnuFileNew_Click()
  542. Timer6.Enabled = True
  543.     ' Call the new file procedure
  544.     FileNew
  545. End Sub
  546. Private Sub mnuFileOpen_Click()
  547.     ' Call the file open procedure.
  548.     FileOpenProc
  549. End Sub
  550. Private Sub mnuHelpAbout_Click()
  551. frmAbout.Show
  552. End Sub
  553. Private Sub mnuOptions_Click()
  554.     ' Toggle the visibility of the toolbar.
  555.     mnuOptionsToolbar.Checked = frmMDI.picToolbar.Visible
  556. End Sub
  557. Private Sub mnuOptionsToolbar_Click()
  558.     ' Call the toolbar procedure, passing a reference
  559.     ' to this form.
  560.     OptionsToolbarProc Me
  561. End Sub
  562. Private Sub mnuRecentFile_Click(Index As Integer)
  563.     ' Call the file open procedure, passing a
  564.     ' reference to the selected file name
  565.     OpenFile (mnuRecentFile(Index).Caption)
  566.     ' Update the list of the most recently opened files.
  567.     GetRecentFiles
  568. End Sub
  569. Private Sub mnuToolsCalculator_Click()
  570. Calculator.Show
  571. End Sub
  572. Private Sub mnuToolsCompilerDirectives_Click()
  573. CDir.Show
  574. End Sub
  575. Private Sub Timer1_Timer()
  576. ProgressBar1.Value = 25
  577. Timer2.Enabled = True
  578. Timer1.Enabled = False
  579. End Sub
  580. Private Sub Timer2_Timer()
  581. ProgressBar1.Value = 50
  582. Timer3.Enabled = True
  583. Timer2.Enabled = False
  584. End Sub
  585. Private Sub Timer3_Timer()
  586. ProgressBar1.Value = 75
  587. Timer4.Enabled = True
  588. Timer3.Enabled = False
  589. End Sub
  590. Private Sub Timer4_Timer()
  591. ProgressBar1.Value = 100
  592. Timer5.Enabled = True
  593. Timer4.Enabled = False
  594. End Sub
  595. Private Sub Timer5_Timer()
  596. ProgressBar1.Value = 0
  597. Timer5.Enabled = False
  598. End Sub
  599. Private Sub Timer6_Timer()
  600. ProgressBar1.Value = 100
  601. Timer7.Enabled = True
  602. Timer6.Enabled = False
  603. End Sub
  604. Private Sub Timer7_Timer()
  605. ProgressBar1.Value = 0
  606. Timer7.Enabled = False
  607. End Sub
  608. Private Sub Timer8_Timer()
  609. frmTip.Show
  610. Timer8.Enabled = False
  611. End Sub
  612.